package com.yaoxuguang.concurrence.wait_notify.join.join_sleep_different;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.wait_notify.join.join_sleep_different
 * @Description: sleep不释放锁
 * @date 2018年12月24日14:04
 */
public class SleepThreadB extends Thread{
    @Override
    public void run() {
        try {
            System.out.println("b run begin timer="+System.currentTimeMillis());
            Thread.sleep(5000);
            System.out.println("b run end timer="+System.currentTimeMillis());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    synchronized public void bServer(){
        System.out.println("打印bServer timer="+System.currentTimeMillis());
    }
}
